package com.wallace.downloadserver.wrapper

import java.io.ByteArrayOutputStream
import javax.servlet.ServletOutputStream
import javax.servlet.WriteListener

/**
 * @Author: Wallace
 * @Description:
 * @Date: 2022/1/20 23:03
 * @Modified By:
 */
class MyServletOutputStream(private val bos: ByteArrayOutputStream) : ServletOutputStream() {
    override fun write(b: Int) {
        bos.write(b)
    }

    override fun write(b: ByteArray) {
        super.write(b, 0, b.size)
    }

    override fun isReady(): Boolean {
        return false
    }

    override fun setWriteListener(listener: WriteListener?) {

    }
}